import React, { Suspense } from 'react'
import { Route, Switch, NavLink, Link ,NavLinkProps} from 'react-router-dom'
import routes from './routerConfig'

interface MYPROPS{
}
interface ROUTERITEM{
  path:string
  component?:any
  children?:ROUTERITEM[]
  to?:string
}
export  default function routerView (props:MYPROPS) {
  const renderDom = (routes: Array<ROUTERITEM>) => {
    return routes.map((item: ROUTERITEM, index: number) => {
      return <Route key={index} path={item.path} element={item.to?<NavLinkProps ></NavLinkProps>}></Route>
    })
  }
}
